from ctypes import *
MAJOR_VERSION = 2
MINER_VERSION = 34
# 宏定义
bfd_size_type = c_ulong
bfd_byte = c_char
bfd_boolean = c_int
bfd_hostptr_t = c_ulong
BFD_HOSTPTR_T = bfd_hostptr_t
BFD_HOST_U_64_BIT = bfd_size_type

BFD_NO_FLAGS = 0x0
HAS_RELOC = 0x1
EXEC_P = 0x2
HAS_LINENO = 0x4
HAS_DEBUG = 0x08
HAS_SYMS = 0x10
HAS_LOCALS = 0x20
DYNAMIC = 0x40
WP_TEXT = 0x80
D_PAGED = 0x100
BFD_IS_RELAXABLE = 0x200
BFD_TRADITIONAL_FORMAT = 0x400
BFD_IN_MEMORY = 0x800
BFD_LINKER_CREATED = 0x1000
BFD_DETERMINISTIC_OUTPUT = 0x2000
BFD_COMPRESS = 0x4000
BFD_DECOMPRESS = 0x8000
BFD_PLUGIN = 0x10000
BFD_COMPRESS_GABI = 0x20000
BFD_CONVERT_ELF_COMMON = 0x40000
BFD_USE_ELF_STT_COMMON = 0x80000
BFD_ARCHIVE_FULL_PATH = 0x100000

BFD_FLAGS_SAVED = BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON
BFD_FLAGS_FOR_BFD_USE_MASK = BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON